package com.xingli.jingdongshop.dao;

import com.xingli.jingdongshop.entity.Goods;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface GoodsDao extends JpaRepository<Goods,Integer> {
    List<Goods> findByGameId(int gameId);
    Page<Goods> findByGameId(Pageable pageable, int gameId);
    Page<Goods> findByGameIdAndCanShow(Pageable pageable, int gameId, boolean canShow);
    List<Goods> findByCabinetId(int cabinetId);
    Page<Goods> findByCabinetId(int cabinetId, Pageable pageable);
}
